<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>客户信息</title>
    <link rel="stylesheet" href="/vendor/simple-line-icons/css/simple-line-icons.css">
    <link rel="stylesheet" href="/vendor/font-awesome/css/fontawesome-all.min.css">
    <link rel="stylesheet" href="/css/styles.css">
    <style type="text/css">
        .table-responsive1 {
            display: block;
            width: 100%;
            height: 100%;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            -ms-overflow-style: -ms-autohiding-scrollbar
        }

        .table-responsive1 > .table-bordered {
            border: 0
        }

        .col-md-6-2 {
            position: relative;
            width: 50%;
            min-height: 1px;
            padding-right: 15px;
            padding-left: 15px
        }

        .col-md-6-2 {
            -webkit-box-flex: 0;
            -ms-flex: 0 0 100%;
            flex: 0 0 100%;
            max-width: 50%
        }

        .row {
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            -ms-flex-wrap: wrap;
            flex-wrap: wrap;
            margin-right: 15px;
            margin-left: 15px
        }
    </style>
</head>
<body>
<a id="addCustomer" href="/addCustomer">
    <button type="button" class="btn btn-primary">
        <i class="fa fa-align-center"></i> &nbsp; 添加客户
    </button>
</a>

<a href="/customer/export">
    <button type="button" class="btn btn-secondary">
        <i class="fa fa-download"></i> &nbsp; 批量导出
    </button>
</a>

<div class="card">
    <div class="card-header bg-light">
        所有客户信息
    </div>
    <form th:action="@{/searchCustomer}" method="post">
        <div class="row mt-4">
            <div class="col-md-4">
                <div class="form-group">
                    <input id="customerId" name="customerId" class="form-control" placeholder="输入工号查询">
                </div>
            </div>
            <div class="col-md-4">
                <div class="form-group">
                    <a>
                        <button class="btn btn-rounded btn-primary" id="search_reward">搜索</button>
                    </a>
                </div>
            </div>
        </div>
    </form>
    <div class="card-body">
        <div class="table-responsive">
            <table class="table table-bordered" id="table_add">
                <thead>
                <tr>
                    <th>客户号</th>
                    <th>姓名</th>
                    <th>电话</th>
                    <th>邮箱</th>
                    <th>qq</th>
                    <!--                                    <th>客户</th>-->
                    <th>性别</th>
                    <th>操作</th>


                </tr>
                </thead>

                <tbody>
                <tr th:each="customer:${emps}">
                    <td th:text="${customer.getCustomerId()}"></td>
                    <td th:text="${customer.getCustomerName()}"></td>
                    <td th:text="${customer.getPhone()}"></td>
                    <td th:text="${customer.getEmail()}"></td>
                    <td th:text="${customer.getQq()}"></td>
                    <td th:text="${customer.getGender()==0?'女':'男'}"></td>

                    <td>
                        <a class="btn btn-sm btn-primary" th:href="@{/customer_msg/}+${customer.getCustomerId()}">编辑</a>


                        <!--                        <a class="btn btn-sm btn-primary" th:href="@{/updateCustomer/}+${emp.getCustomerId()}">编辑</a>-->
                        <a class="btn btn-sm btn-danger"
                           onclick="javascript:if (confirm('确定删除吗？')) { return true;}else{return false;};"
                           th:href="@{/deleteCustomer/}+${customer.getCustomerId()}">删除</a>
                    </td>
                    <!--                        <td><a class='user-msg' th:href="@{/customer_msg/}+${emp.getCustomerId()}">详情</a></td>-->

                </tr>

                </tbody>

            </table>
            <button type="button" class="btn btn-secondary btn-sm add">首页</button>
            <button type="button" class="btn btn-secondary btn-sm add">上一页</button>
            <button type="button" class="btn btn-secondary btn-sm add">下一页</button>
            <button type="button" class="btn btn-secondary btn-sm add">尾页</button>
        </div>
    </div>
</div>


</div>
<script src="/vendor/jquery/jquery.min.js"></script>
<script src="/vendor/popper.js/popper.min.js"></script>
<script src="/vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="/vendor/chart.js/chart.min.js"></script>

</body>
</html>
